<template>
  <div class="app-container">
    <el-tabs type="border-card" :value="activeTab" @tab-click="changeTab">
      <el-tab-pane v-if="roleCheck('list')" name="one" label="活动查询">
        <list v-show="activeTab === 'one'"></list>
      </el-tab-pane>
      <el-tab-pane v-if="roleCheck('config')" name="two" label="活动配置">
        <config v-show="activeTab === 'two'"></config>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
  import {tabs} from '@/build';
  import config from './config';
  import list from './list'

  export default {
    name: "activity-break-through",

    components: {
      config,
      list
    },

    mixins: [tabs],

    data() {
      return {
        activeTab: 'one'
      }
    },
    mounted(){
      this.$store.dispatch(types.SAVE_OPERATION_LOG, {content: _.getContent(this.$route, '活动查询', true)});
    },
    methods: {
      changeTab(tabs) {
        this.activeTab = tabs.name
        this.$store.dispatch(types.SAVE_OPERATION_LOG, {content: _.getContent(this.$route, tabs.label, true)});
      }
    }
  }
</script>
<style scoped>

</style>
